package backend.component;

public class RISCVglobalfloat extends RISCVglobalvar{
    private static int floatnum = 0;
    private int floatvalue;

    public RISCVglobalfloat(int floatvalue) {
        this.name = ".ConstFloat" + floatnum++;
        this.floatvalue = floatvalue;
    }

    public String toString() {
        return SECTION_RODATA +
                name + ":\n" +
                String.format(WORD, floatvalue);
    }

    public static int floatnum() {
        return floatnum;
    }

    public static void setFloatnum(int floatnum) {
        RISCVglobalfloat.floatnum = floatnum;
    }

    public int floatvalue() {
        return floatvalue;
    }

    public void setFloatvalue(int floatvalue) {
        this.floatvalue = floatvalue;
    }
}
